package homework27;

public class Mainframe {
   private Memory memory;//子系统的应用
   private CPU cpu;
   private HardDisk hardDisk;
   private OS os;
   public Mainframe(){
       memory = new Memory();
       cpu = new CPU();
       hardDisk = new HardDisk();
       os = new OS();
   }
   public void on(){
       memory.check();
       cpu.run();
       hardDisk.read();
       os.load();
   }
   public void off(){
       memory.off();
       cpu.off();
       hardDisk.off();
       os.off();
   }
}
